package com.dreamwhale.machinery.goods.controller;


import com.dreamwhale.machinery.config.DataResult;
import com.dreamwhale.machinery.entity.VipArticleCollect;
import com.dreamwhale.machinery.user.service.UserShopService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * <p>
 * 机修师信息表 前端控制器
 * </p>
 *
 * @author Author
 * @since 2020-05-28
 */
@RestController
@RequestMapping("/user")
public class MechanicInfoController {


    @Resource
    private UserShopService userShopService;

    /**
     * 商户入驻查重
     *
     * @return
     */
    @RequestMapping("/selectUserShopsCount")
    public DataResult selectUserShopsCount(Integer userId) {
        int count = userShopService.selectUserShopsCount(userId);
        if (count > 0) {
            return DataResult.build(300, "你已入驻过");
        }

        return DataResult.build(200, "1");
    }


}

